import type { RouteRecordRaw } from "vue-router";


export const constRoutes : Array<RouteRecordRaw> = [
    {
        path:"/login",
        name:"login",
        component:() => import("@/views/login/index.vue"),
        meta:{ title:"登录" }
    },
    {
        path: "/",
        redirect: "/home/recommend",
        children: [
            {
                path: "home",
                name: "home",
                component: () => import("@/views/home/index.vue"),

            },
        ],
    },
    {
        path: "/404",
        name: "404",
        component: () => import("@/views/error/404.vue"),
    },
    {
        path:"/home",
        name:"home",
        component:() => import("@/views/home/index.vue"),
        meta:{ title:"中舞网_爱一格旗下舞蹈网" },
        redirect:"/home/recommend",
        children:[
            {
                path:'recommend',
                name:'recommend',
                component:() => import("@/views/home/components/recommend.vue"),

            },
            {
                path:'work',
                name:'work',
                component:() => import("@/views/home/components/work.vue"),
            },
            {
                path:'course',
                name:'course',
                component:() => import("@/views/home/components/course.vue"),
            },
            {
                path:'theme',
                name:'theme',
                component:() => import("@/views/home/components/theme.vue"),
            },
            {
                path:'dynamic',
                name:'dynamic',
                component:() => import("@/views/home/components/dynamic.vue"),
            },
            {
                path:'focus',
                name:'focus',
                component:() => import("@/views/home/components/focus.vue"),
            }
        ]
    },
    {
        path:'/discovery',
        name:'discovery',
        component: () => import('@/views/discovery/index.vue'),
        meta:{title:'购买舞蹈视频课'}
    },
    {
        path: "/trainingRoom",
        name: "trainingRoom",
        component: () => import("@/views/trainingRoom/index.vue"),
        meta: { title: "我的练习室" },
        children: [
            //默认
            {
                path: "default",
                name: "default",
                component: () => import("@/views/trainingRoom/default/index.vue"),
                meta: {

                },
            },
          //缓存
            {
                path: "cache",
                name: "cache",
                component: () => import("@/views/trainingRoom/cache/index.vue"),
                meta: {

                },
            },
          //音乐
            {
                path: "audio",
                name: "audio",
                component: () => import("@/views/trainingRoom/audio/index.vue"),
                meta: {

                },
            },
          //收藏
            {
                path: "collect",
                name: "collect",
                component: () => import("@/views/trainingRoom/collect/index.vue"),
                meta: {

                },
            },
          //历史
            {
                path: "history",
                name: "history",
                component: () => import("@/views/trainingRoom/history/index.vue"),
                meta: {

                },
            },


        ]
    },
    {
        path: "/communication",
        name: "communication",
        component: () => import("@/views/communication/index.vue"),
        meta: { title: "舞蹈行业社交圈，就在爱一格旗下舞蹈网！" },
        children: [
            {
                path: "interaction",
                name: "interaction",
                component: () => import("@/views/communication/interaction/index.vue"),
                meta: {
                    title: "互动通知",
                },
            },
            {
                path: "orderForm",
                name: "orderForm",
                component: () => import("@/views/communication/orderForm/index.vue"),
                meta: {
                    title: "订单通知",
                },
            },
        ]
    },
    {
        path:'/my',
        name:'my',
        component: () => import('@/views/my/index.vue'),
        meta:{title:'资源动态_我的_中舞网'},
        children:[
            {
                path:"search",
                name:'Search',
                component:()=>import("@/views/my/search/index.vue")
            },
            // 会员
            {
                path:'member',
                name:'Member',
                component:()=>import("@/views/my/member/index.vue")
            },
            // 钱包
            {
                path:'purse',
                name:'Purse',
                component:()=>import("@/views/my/purse/index.vue")
            },
            // 优惠卷
            {
                path:"coupons",
                name:"Coupons",
                component:()=>import("@/views/my/coupons/index.vue")
            },
            // 我的订单
            {
                path:'orderFrom',
                name:'OrderFrom',
                component:()=>import("@/views/my/orderFrom/index.vue")
            },
            // 我的资料
            {
                path:"mydata",
                name:"Mydata",
                component:()=>import("@/views/my/mydata/index.vue")
            }
        ]
    },
]
